Eliminating Dependent Pattern Matching
نویسندگان
چکیده
This paper gives a reduction-preserving translation from Coquand’s dependent pattern matching [4] into a traditional type theory [11] with universes, inductive types and relations and the axiom K [22]. This translation serves as a proof of termination for structurally recursive pattern matching programs, provides an implementable compilation technique in the style of functional programming languages, and demonstrates the equivalence with a more easily understood type theory. Dedicated to Professor Joseph Goguen on the occasion of his 65th birthday.
منابع مشابه
Dead Code Elimination through Dependent Types
Pattern matching is an important feature in various functional programming languages such as SML, Caml, Haskell, etc. In these languages, unreachable or redundant matching clauses, which can be regarded as a special form of dead code, are a rich source for program errors. Therefore, eliminating unreachable matching clauses at compile-time can signiicantly enhance program error detection. Furthe...
متن کاملA Hardware-Efficient Pattern Matching Architecture Using Process Element Tree for Deep Packet Inspection
This paper proposes a new pattern matching architecture with multi-character processing for deep packet inspection. The proposed pattern matching architecture detects the start point of pattern matching from multi-character input using input text alignment. By eliminating duplicate hardware components using process element tree, hardware cost is greatly reduced in the proposed pattern matching ...
متن کاملConstructor specialisation for Haskell programs
User-defined data types, pattern-matching, and recursion are ubiquitous features of Haskell programs. Sometimes a function is called with arguments that are statically known to already be in constructor form, so that the work of pattern-matching is wasted. Even worse, the argument is sometimes freshly-allocated, only to be immediately decomposed by the function. In this paper we describe a simp...
متن کاملA Benchmark Evaluation of Incremental Pattern Matching in Graph Transformation
In graph transformation, the most cost-intensive phase of a transformation execution is pattern matching, where those subgraphs of a model graph are identified and matched which satisfy constraints prescribed by graph patterns. Incremental pattern matching aims to improve the efficiency of this critical step by storing the set of matches of a graph transformation rule and incrementally maintain...
متن کاملEliminating overlapping of pattern matching when verifying Erlang programs in μCRL
When verifying Erlang programs in the process algebra μCRL specification, if there exists overlapping between patterns in the Erlang source codes, the problem of overlapping in pattern matching occurs when translating the Erlang codes into the μCRL specification. This paper investigates the problem and proposes an approach to overcome it. The proposed method rewrites an Erlang program with over...
متن کامل